package ClassWork.Job02;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

/**
 * @author 培培
 * @condition 努力学习中
 */
public class Job02 {
    public static void main(String[] args) throws IOException {

        String filePath = "d:\\story.txt";
        BufferedReader br = new BufferedReader(new FileReader(filePath));
        String line = "";//按行读取
        int i = 0;
        while ((line = br.readLine()) != null){
            System.out.println((++i) + " " + line );
        }
        if (br != null) {
            br.close();
        }
    }
}
